Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SDV Manifest parse error #2217

Merged
merged 2 commits into from
Oct 31, 2024
Merged

Fix SDV Manifest parse error #2217

merged 2 commits into from
Oct 31, 2024

Conversation

halgari
Copy link
Collaborator

@halgari halgari commented Oct 30, 2024

After installing a SDV collection we were getting a lot of "Manfifest parse errors". This was due to our ChunkedStreamReader improperly terminating streams it reads in the sync code. This fixes that bug (copies the logic from the async version) which removes the parse errors.

@halgari halgari marked this pull request as ready for review October 30, 2024 19:51
@halgari halgari requested a review from a team October 30, 2024 19:51
Copy link
Member

@Sewer56 Sewer56 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one moment, don't merge

@Sewer56
Copy link
Member

Sewer56 commented Oct 30, 2024

This PR had a bug in it, but I should have fixed it just now with an extra commit.

When reading, the offset and (especially) count components of the function signatures were not being considered in the previous commit. Depending on how the caller used the Read method, that may have led to incorrect behaviour.

With the use of Span<T> in the previous commit, and the blanket implementation that borrows from the MemoryPool, this would have led to a buffer overrun, and as a result, an exception. The new commit should correctly-ish consider them.

Tests should probably be more thorough, please check with the original issue/ticket.

@Al12rs Al12rs merged commit e06a152 into main Oct 31, 2024
11 checks passed
@Al12rs Al12rs deleted the manifest-parse-error branch October 31, 2024 11:53
@Sewer56
Copy link
Member

Sewer56 commented Oct 31, 2024

(Since this got merged it seems: I feel kinda bad about having this merged by non-submitter, since I committed into this branch 😅 , since there was no response since.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants